const Controller = require('egg').Controller;
module.exports = class RecordController extends Controller {
    async index(ctx) {
        let params = ctx.request.query;
        let page = params.page,
            size = params.size,
            owner = params.owner;
        if (!owner) {
            ctx.body = {
                msg: '必须传递owner参数'
            };
            ctx.status = 500;
            return;
        }
        delete params.page;
        delete params.size;
        delete params.owner;
        ctx.body = await ctx.service.record.page(page, size, { status: 1, owner: owner }, params);
    }
}